package com.example.cricketscorer.client.view;

import com.example.cricketscorer.client.presenter.RootScorerPresenter.IRootScorerView;
import com.example.cricketscorer.client.widget.interfaces.IWidget;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable;

public class RootScorerView extends Composite implements IRootScorerView{
	
	private FlexTable table = new FlexTable();

	public RootScorerView() {

		table.getFlexCellFormatter().setColSpan( 0, 0, 2 );

		initWidget( table );

	}

	@Override
	public void setSummaryWidget(IWidget widget) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setBattingWidget(IWidget widget) {
		table.setWidget(0, 0, widget.getMyWidget());
	}

	@Override
	public void setBowlingWidget(IWidget widget) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setRecentOversWidget(IWidget widget) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setActionsWidget(IWidget widget) {
		table.setWidget(1, 0, widget.getMyWidget());
	}
	

}
